package com.dries.security.validate.code;

import com.dries.security.validate.code.captcha.sms.DefaultSmsCodeSender;
import com.dries.security.validate.code.captcha.sms.SmsCodeSender;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 验证码生成器
 * @Author ZSY
 * @createTime 2020/9/7 16:49
 */
@Configuration
public class ValidateCodeBeanConfig {

    @Bean
    @ConditionalOnMissingBean(SmsCodeSender.class)
    public SmsCodeSender smsCodeSender() {
        return new DefaultSmsCodeSender();
    }

}
